package timing.ukulele.flow.dictionary;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import timing.ukulele.common.dictionary.CodeValueEnum;

public enum FlowStatusEnum implements CodeValueEnum<Short> {
    INIT((short) 0, "初始"),
    NEW_VERSION((short) 5, "新版本"),
    PUBLISHED((short) 10, "已发布");
    @EnumValue//标记数据库存的值是code
    @JsonValue    //标记响应json值
    private Short code;
    private String value;

    FlowStatusEnum(Short code, String value) {
        this.code = code;
        this.value = value;
    }

    public void setCode(Short code) {
        this.code = code;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public Short getCode() {
        return code;
    }

    @Override
    public String getValue() {
        return value;
    }
}
